#include <gtest/gtest.h>
#include <iostream>
#include <string>
#include <unordered_map>

std::unordered_map<std::string,std::string> mymap;
class MyMapTest : public testing::Environment
{
public:
    void SetUp()
    {
        std::cout << "单元测试前执行的初始化\n";
        mymap.insert(std::make_pair("Hello","你好"));
        mymap.insert(std::make_pair("Bye","再见"));
    }
    void TearDown()
    {
        std::cout << "单元测试执行完毕的清理\n";
        mymap.clear();
    } 
private:
};

TEST(MyMapTest,test1)
{
    //ASSERT_EQ(mymap.size(),1);
    EXPECT_EQ(mymap.size(),1);
}

TEST(MyMapTest,test2)
{
    EXPECT_EQ(mymap.size(),2);
}

int main()
{
    testing::InitGoogleTest();
    RUN_ALL_TESTS();

    return 0;
}